package com.google.code.jmarias.client.states;
import com.google.code.jmarias.client.Globals;
import java.awt.Font;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.TrueTypeFont;
import org.newdawn.slick.state.BasicGameState;

/**
 * Abstraktni trida pro jednotlive obrazovky
 * @author bart
 */
public abstract class AbstractState extends BasicGameState {
    protected Globals globals;

    /* Definice promennych pro fonty */
    /** Stredni pismo */
    protected Font font = null;
    protected TrueTypeFont trueFont = null;

    /** Velke pismo */
    protected Font fontBig = null;
    protected TrueTypeFont trueFontBig = null;

    /** Male pismo */
    protected Font fontSmall = null;
    protected TrueTypeFont trueFontSmall = null;

//    protected void loadFonts() {
//
//        /* Incicializace jednotlivych velikosti a rezu pisma */
//        font = new Font("sansserif", Font.PLAIN, 16);
//        trueFont = new TrueTypeFont(font, true);
//
//        fontBig = new Font("sansserif", Font.BOLD, 25);
//        trueFontBig = new TrueTypeFont(fontBig, true);
//
//        fontSmall = new Font("sansserif", Font.PLAIN, 10);
//        trueFontSmall = new TrueTypeFont(fontSmall, true);
//
//    }

    protected void nullControls(GameContainer gc) throws SlickException {
        Input input = gc.getInput();

        /* Globalni klavesove zkratky - mohou byt prepsany na nizsich urovnich */
        if(input.isKeyPressed(Input.KEY_ENTER)) {
        } else
        if(input.isKeyPressed(Input.KEY_LEFT)) {
        } else
        if(input.isKeyPressed(Input.KEY_RIGHT)) {
        } else
        if(input.isKeyPressed(Input.KEY_ESCAPE)) {
        } else
            if(input.isKeyPressed(Input.KEY_F11)) {
//                Globals.getInstance().getApp().setFullscreen(! Globals.getInstance().getApp().isFullscreen());
            }

        /* Globalni mysi zkratky */
        if(input.isMouseButtonDown(Input.MOUSE_LEFT_BUTTON)) {
        } else
        if(input.isMouseButtonDown(Input.MOUSE_RIGHT_BUTTON)) {
        }

    }

}
